package com.lxq.test1912.Main02;

import java.util.Scanner;

class Point{
    int x,y;
    public Point(int x, int y) {
        this.x = x;
        this.y = y;
    }
}

public class Main {
    public static boolean isSuitable(Point a,Point b) {
        if ((a.x==b.x&&(a.y==b.y+1||a.y==b.y-1))||(a.y==b.y&&(a.x==b.x+1||a.x==b.x-1))) return true;
        else return false;
    }
    public static boolean score(Point a,Point b){
        if ((a.x==b.x+1&&(a.y==b.y+1||a.y==b.y-1))||(a.x==b.x-1&&(a.y==b.y+1||a.y==b.y-1))) return true;
        else return false;
    }
    public static int[] solve(Point[] p){
        int[] a = new int[5];
        Point[] points = p;


        //判断每个点的情况
        for (int i=0;i<p.length;i++){
            int count = 0,score = 0;
            //判断点是否有上下左右点
            for (int j=0;j<p.length;j++){
                if (j==i) continue;
                if (isSuitable(points[i],points[j])) count++;
                if (score(points[i],points[j])) score++;
            }
            if (count==4){
                a[score]++;
            }
        }

        return a;
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();//节点数
        Point[] points = new Point[n];

        for (int i=0;i<n;i++){
            int x=sc.nextInt();
            int y=sc.nextInt();
            points[i] = new Point(x, y);
        }

        int[] grade = solve(points);
        for (int tag:grade
             ) {
            System.out.println(tag);
        }
    }
}
